package com.codebo.homiematch.controller;

import com.codebo.homiematch.common.BaseResponse;
import com.codebo.homiematch.common.ResultUtils;
import com.codebo.homiematch.model.dto.ChatDTO;
import com.codebo.homiematch.model.vo.ChatVO;
import com.codebo.homiematch.service.ChatService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/chat")
public class ChatController
{
    @Resource
    private ChatService chatService;
    @GetMapping("/list")
    public BaseResponse<List<ChatVO>> chat()
    {
        List<ChatVO> chatVOList=  chatService.chatList();

        return ResultUtils.success(chatVOList);
    }
}
